package com.jasperframework.boot.common.constraint;


import com.jasperframework.boot.common.annotation.CheckCase;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

public class CheckCaseValidator implements ConstraintValidator<CheckCase, String> {

    //校验注解
    private CheckCase annotation;

    @Override
    public void initialize(CheckCase constraintAnnotation) {

        this.annotation = constraintAnnotation;
    }

    @Override
    public boolean isValid(String object, ConstraintValidatorContext constraintContext) {

        return object == null;
    }

}
